(1) Field of the Invention
The present invention relates to a code amount estimating device which estimates a code amount obtained after coding data of an image and to an image coding apparatus including the code amount estimating device, and particularly relates to a code amount estimating device which estimates a code amount obtained after arithmetic coding of binary data and to an image coding apparatus including such code amount estimating device.
(2) Description of the Related Art
With the development of digital image technology, recent years have seen a steady rise in the amount of data of image data, particularly video, being handled. For example, the amount of data of High Definition (HD) images, which have come into practical use in recent years, is about six times that of the conventional Standard Definition (SD) images.
On the other hand, with the improvement of the information processing performance of computers and other devices, video compression using complex calculation has become possible, and image data compression rate is being greatly enhanced. The recently standardized H.264/AVC is a standard which implements a compression rate that is approximately twice that of MPEG-2. H.264/AVC implements a high compression rate by combining many compression techniques. As such, the amount of calculation significantly increases compared to conventional compression methods.
Entropy coding (variable-length coding) is available as one compression technique utilized in AVC/H.264. Two methods known as Context-based Adaptive Variable Length Coding (CAVLC) and Context-based Adaptive Binary Arithmetic Coding (CABAC) are provided as entropy coding methods in H.264/AVC. Compared to CAVLC, CABAC requires more-complex computation but realizes a high code-compression rate.
Coding in CABAC is mainly divided into two processes. The first is binarization in which multi-value data to be coded is converted into binary data. The second is arithmetic coding in which arithmetic coding is performed on the binary data obtained through the binarization, while the occurrence probability of the binary data is calculated and updated.
In the arithmetic coding in CABAC, coding is performed using probability interval information and symbol occurrence probability information which were updated during the coding of an immediately preceding binary symbol. As such, in the arithmetic coding, there is a need to perform serial processing on a per binary symbol basis. However, in the arithmetic coding, when the data amount of the binary symbol becomes large, real-time processing becomes difficult, and measuring the code amount in real time may not always be possible. As such, there is a problem that the amount of code cannot be appropriately controlled based on the amount of code to be generated. In order to solve such problem, there is proposed, for example, a method of predicting the amount of code to be generated, based on prediction residual resulting from the performance of intra-frame and inter-frame prediction on an input image signal (see Patent Reference 1: Japanese Unexamined Patent Application Publication No. 2005-203905 for example).